package com.kiln.juxingqs.ui.vm

import android.app.Application
import androidx.lifecycle.MutableLiveData
import client.global.commlib.network.data.JsonResult
import client.global.commlib.utils.Util
import com.kiln.juxingqs.api.bean.VersionRet
import com.kiln.juxingqs.ui.viewmodel.MiddleVm
import com.kiln.juxingqs.utils.AppConfig

class LauncherViewModel(app: Application) : MiddleVm(app) {

    val versionRet = MutableLiveData<JsonResult<VersionRet>>()

    fun getVersion() {
        hold({
//            "${Util.getVersionCode(getApplication())}"
            server.get_update("android", "${AppConfig.getVersionCode()}")
        }, success = {
            versionRet.value = it
        })

    }


}